package com.share.device.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.share.common.core.annotation.Excel;
import com.share.common.core.web.domain.BaseEntity;
import com.share.device.emqx.annotation.DictFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 柜机管理对象 cabinet
 *
 * @author guo
 * @date 2025-05-08
 */
@Data
@Schema(description = "充电宝柜机")
public class Cabinet extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 机柜编号 */
    @Excel(name = "机柜编号")
    @Schema(description = "机柜编号")
    private String cabinetNo;

    /** 名称 */
    @Excel(name = "名称")
    @Schema(description = "名称")
    private String name;

    /** 类别id */
    @Excel(name = "类别id")
    @Schema(description = "类别id")
    private Long cabinetTypeId;

    @TableField(exist = false)
    @Schema(description = "类别名称")
    private String cabinetTypeName;

    /** 总插槽数量 */
    @Excel(name = "总插槽数量")
    @Schema(description = "总插槽数量")
    private Long totalSlots;

    /** 空闲插槽数量 */
    @Excel(name = "空闲插槽数量")
    @Schema(description = "空闲插槽数量")
    private Long freeSlots;

    /** 已使用插槽数量 */
    @Excel(name = "已使用插槽数量")
    @Schema(description = "已使用插槽数量")
    private Long usedSlots;

    /** 可用充电宝数量 */
    @Excel(name = "可用充电宝数量")
    @Schema(description = "可用充电宝数量")
    private Long availableNum;

    /** 描述 */
    @Excel(name = "描述")
    @Schema(description = "描述")
    private String description;

    /** 当前位置id */
    @Excel(name = "当前位置id")
    @Schema(description = "当前位置id")
//    @DictFormat(dictType = "location_name",targetField = "locationName")
    private Long locationId;

    /** 状态（0：未投入 1：使用中 -1：故障） */
    @Excel(name = "状态", readConverterExp = "0=：未投入,1=：使用中,-=1：故障")
    @Schema(description = "状态")
    private String status;

}
